home *** CD-ROM | disk | FTP | other *** search
AMOS Source Code | 1992-02-26 | 3.7 KB | 161 lines |
- '---------------------------------------------------------
- ' Peel scroll by Salim Gasmi for AmoNER #6
- '
- 'some flicker left on the interpreted version
- 'but the compiled one is smooth !!!
- '
- 'E-mail adress: gasmisam@quartz.u-strasbg.fr
- ' or gasmisam@azur.u-strasbg.fr
- ' or boudjemi@turing.u-strasbg.fr (put SALIM as Subject:)
- '
- Break Off
- '
- '--------------------------------------------------------
- '- Fonts grabing and description -
- '--------------------------------------------------------
- '
- '
- Unpack 6 To 0
- Screen Hide
- SIZE_X=16
- SIZE_Y=16
- C$="abcdefghijklmnopqrstuvwxyz .,!'?:()0123456789DBMSFZCG-+//"
- N=Len(C$)
- Dim X(N),Y(N)
- For Y=1 To 3
- For X=1 To 19
- Inc CP
- X(CP)=(X-1)*SIZE_X+1
- Y(CP)=(Y-1)*SIZE_Y+101
- Next X
- Next Y
- '
- '--------------------------------------------------------
- '- Text implementation -
- '--------------------------------------------------------
- '
- '
- T$="here is a peel scroll made for amoner !! hope you like it .... "
- T$=T$+"this piece of code is dedicated to michael d. cox "
- T$=T$+"who seems to like this little scrolly ....... "
- LT=Len(T$)
- Erase 9
- Reserve As Data 9,LT+1
- ST=Start(9)
- For I=1 To LT
- R$=Mid$(T$,I,1)
- O=Instr(C$,R$)
- Poke ST+I,O
- Next I
- '
- '--------------------------------------------------------
- '- Screens & grafiks descriptions -
- '--------------------------------------------------------
- '
- '
- Screen Open 2,375,250,4,0
- Hide
- Cls 0
- Flash Off
- Colour 1,$FFF
- Screen Open 1,375,250,2,0
- Get Palette 0
- Cls 0
- COPPER[9]
- Rainbow 1,1,80,190
- Dual Playfield 2,1
- Dual Priority 1,2
- '
- '--------------------------------------------------------
- '- Scrolls declarations -
- '--------------------------------------------------------
- '
- '
- H=20
- L=150
- XD=10
- YD=200
- Def Scroll 1,XD,YD To 375,YD+H,-1,0
- Def Scroll 2,XD,YD+H-L To XD+H,YD+H,0,-1
- Def Scroll 3,XD,YD-L+H To 350,YD-L+2*H,1,0
- Def Scroll 4,XD+3*L/2,YD-L/2 To XD+3*L/2+H,YD+H,0,-1
- Def Scroll 5,XD+L/2,YD-L/2 To XD+3*L/2+H,YD-L/2+H,-1,0
- Def Scroll 6,XD+L/2,YD-L/2 To XD+L/2+H,YD+H,0,1
- Def Scroll 7,XD+2*L,YD-L-L/3+2*H To XD+2*L+H,YD-L+2*H,0,-1
- Def Scroll 8,0,YD-L+2*H-L/3 To XD+2*L+H,YD-L+H*3-L/3,-1,0
- Def Scroll 9,110,200 To 375,220,-1,0
- Def Scroll 10,110,0 To 130,220,0,-1
- '
- '--------------------------------------------------------
- '- Main loop -
- '--------------------------------------------------------
- '
- '
- Do
- Exit If Mouse Key=1
- Inc C
- If C=(SIZE_X+1)
- Add P,1,1 To LT
- R=Peek(ST+P)
- Screen Copy 0,X(R),Y(R),X(R)+SIZE_X,Y(R)+SIZE_Y To 1,345,201
- Screen Copy 1,345,201,345+SIZE_X,201+SIZE_Y To 2,345,202
- C=0
- End If
- For I=1 To 8
- Scroll I
- Next I
- Screen 2
- Scroll 9
- Scroll 10
- Screen 1
- Wait Vbl
- Loop
- '
- '--------------------------------------------------------
- '- This is the end (Doors/Apocalypse Now) -
- '--------------------------------------------------------
- '
- '
- Erase 9
- Copper Off
- Default
- Run "autoexec.amos"
- '
- '--------------------------------------------------------
- '- Rainbow procedure -
- '--------------------------------------------------------
- '
- '
- Procedure COPPER[C0LOR]
- Set Rainbow 1,C0LOR,91,"","",""
- For I=0 To 15
- K=3840+16*I
- Rain(1,C)=K
- Inc C
- Next I
- For I=0 To 14
- K=K-256
- Rain(1,C)=K
- Inc C
- Next I
- For I=0 To 14
- K=K+1
- Rain(1,C)=K
- Inc C
- Next I
- For I=0 To 14
- K=K-16
- Rain(1,C)=K
- Inc C
- Next I
- For I=0 To 14
- K=K+256
- Rain(1,C)=K
- Inc C
- Next I
- For I=0 To 14
- K=K-1
- Rain(1,C)=K
- Inc C
- Next I
- End Proc